package com.yhxd.modular.news.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;

/**
 * banner图
 */
@Data
@Entity(name = "banner_images")
@EntityListeners(value = AuditingEntityListener.class)
public class BannerImages implements Serializable {

    @ApiModelProperty(value = "id")
    @Id
    @GeneratedValue(generator = "idGenerator")
    @GenericGenerator(name = "idGenerator", strategy = "com.yhxd.utils.IdUtils")
    @Column(name = "id")
    private Long id;

    @ApiModelProperty(value = "banner标题")
    @Column(name = "title")
    private String title;

    @ApiModelProperty(value = "banner图地址")
    @Column(name = "image_url")
    private String imageUrl;

    @ApiModelProperty(value = "链接地址")
    @Column(name = "link_url")
    private String linkUrl;

    @ApiModelProperty(value = "排序")
    @Column(name = "sort_num")
    private Integer sortNum = 1;

    @ApiModelProperty(value = "内容类型,0禁用,1启用",hidden = true)
    @Column(name = "status")
    private Integer status = 1;

}
